<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>fsu-detali-alarm</title>
    <link rel="stylesheet" href="../../../script/ccssoft/css/ccssoft-lite.css" />
    <link rel="stylesheet" href="../css/base.css" />
    <link rel="stylesheet" href="../module/css/aui.css" />
</head>

<body>
    <header class="aui-bar aui-bar-nav ccssoft-aui-bar-theme" id="header">
        <a class="aui-btn ccssoft-aui-bar-theme aui-pull-left" id="back" onclick="api.closeWin();"> <span
                class="aui-iconfont aui-icon-left"></span>
        </a>
        <a class="aui-btn ccssoft-aui-bar-theme aui-pull-right" tapmode="" onclick="openQueryStation()"><span
                class="aui-iconfont aui-icon-search"></span>
        </a>
        <div class="aui-title">
            告警查询
        </div>
    </header>
    <div class="wrapper">
        <div class="box-cpn" id="queryStation" style="display: none">
            <h4>
                <div class="title title-red"></div>
                <div class="aui-tab" id="tab">
                    <div class="aui-tab-item" id="tbc1">告警信息</div>
                </div>
            </h4>
            <div class="my-form" id="my-form"></div>
        </div>
        <div id="content"></div>
    </div>
</body>
<script src="../../../script/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="../module/script/api.js"></script>
<script type="text/javascript" src="../module/script/aui-tab.js"></script>
<script type="text/javascript" src="../../../script/common.js"></script>
<script type="text/javascript" src="../../../script/debug.js"></script>
<script type="text/javascript" src="../../../script/navigate.js"></script>
<script type="text/javascript" src="../js/fsu-common.js"></script>
<script type="text/javascript" src="../js/fsu-detection-list.js"></script>
<script type="text/javascript" src="../js/init-list.js"></script>
<script type="text/javascript">
    const cacheName = 'fsu-list-detail-alarm'
    apiready = () => {
        api.parseTapmode()
        pagination.pageNum = 1
        pagination.pageSize = 10
        initPage()
    }

    // 初始化查询条件
    const searchFrom = [
        // { label: 'FSUID', type: 'input', name: 'fsuId' },
        { label: '告警级别', type: 'select2', name: 'level', options: [{ label: '一级告警', value: '1' }, { label: '二级告警', value: '2' }, { label: '三级告警', value: '3' }, { label: '四级告警', value: '4' }] },
    ]
    const param = JSON.parse(handleLocalStorage('get', cacheName))

    function initPage() {
        initSearchForm(searchFrom)
        getSearchForm()
    }

    // 查询接口
    function search(data) {
        data.pageNum = pagination.pageNum || 1
        data.pageSize = pagination.pageSize || 10
        data.fsuId = param.data
        api.showProgress({
            title: '加载中',
            modal: false
        })
        request({
            url: '/app/alarm/active/list',
            type: 'post',
            data: data,
            success: res => {
                console.log(JSON.stringify(res))
                initAlarmListByFSU(res)
                return api.hideProgress()
            },
            catch: res => api.hideProgress()
        })
    }
</script>

</html>